﻿using Avalonia.BiliBili.Libs.Models;
using Bilibili.Model.Live;
using ReactiveUI;
using System.Collections.Generic;

namespace Avalonia.BiliBili.Controls.ViewModels
{
    public sealed class LiveViewModel : ViewModelBase
    {
        private LiveInfoModel roomInfo;
        public LiveInfoModel RoomInfo
        {
            get => roomInfo;
            set => this.RaiseAndSetIfChanged(ref roomInfo, value);
        }
        private List<GuardRankItem> guardList;
        public List<GuardRankItem> GuardList
        {
            get => guardList;
            set => this.RaiseAndSetIfChanged(ref guardList, value);
        }
        private List<RankActivityModel> rankList;
        public List<RankActivityModel> RankList
        {
            get => rankList;
            set => this.RaiseAndSetIfChanged(ref rankList, value);
        }
        private List<DevoteModel> devoteList;
        public List<DevoteModel> DevoteList
        {
            get => devoteList;
            set => this.RaiseAndSetIfChanged(ref devoteList, value);
        }
        public LiveViewModel()
        {
            rankList =
            [
                new("金瓜子榜","gold-rank"),
                new("今日礼物榜","today-rank"),
                new("七日礼物榜","seven-rank"),
                new("粉丝榜","fans"),
            ];
        }
        public override void Dispose()
        {
            base.Dispose();
            rankList?.Clear();
            guardList?.Clear();
            devoteList?.Clear();
        }
    }
}